import pandas as pd
df=pd.read_csv('../../file/分类信息.csv', encoding='utf_8_sig')
df=df.iloc[:,:1]
df=df.drop_duplicates()
data=[]
df=pd.DataFrame(df)
id=1
for row in df.iterrows():
    data.append({
        'id':id,
        'category': row[1]['first_category']
    })
    id=id+1

data=pd.DataFrame(data)
data.to_csv('一级分类信息.csv',index=False,encoding='utf_8_sig')